<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		
		#box{
			width: 300px;
			height:400px;
			border: 1px solid red; 
		}
	</style>
	<script>
		window.onload= function () {
			box = document.getElementById('box')
			input = document.getElementById('input')
			btn = document.getElementById('btn')

			btn.onclick= function () {
				data = input.value;

				data = "<p>"+data+"</p>";

				box.innerHTML = box.innerHTML+data;
			}

			
		}
	</script>
</head>
<body>
	<div id="box">
		
	</div>
	<input type="text" id="input">
	<input type="button" id="btn" value="发送">
</body>
</html>